package com.huaishushu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huaishushu.entity.Employee;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 员工信息 服务类
 * </p>
 *
 * @author ChiBaoBaoHuaiShuShu
 * @since 2023-05-28
 */
public interface IEmployeeService extends IService<Employee> {

    /**
     * 根据用户的username查询是否存在
     * @param username
     * @return
     */
    Employee login(String username);

    /**
     * 新增员工信息
     * @param employee
     * @return
     */
    boolean save(HttpServletRequest request, Employee employee);

    /**
     * 员工信息分页查询
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    Page<Employee> page(Integer page, Integer pageSize, String name);

    /**
     * 启用/禁用员工账号
     * @param employee
     * @return
     */
    boolean update(HttpServletRequest resource,Employee employee);

}
